import request from '@/utils/request';
const base_url = 'https://console-mock.apipost.cn/app/mock/project/79ea3b05-05f2-4f42-b40d-3d7f56281f27';
// 获取店铺数据
export const getShop = () => {
    return request({
        url: '/scrm-api/console/retail/shop/store-list',
        method: 'GET'
    });
};
// 数据总览量
export const totalNum = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-over-view',
        method: 'POST',
        data,
        timeout: 60000
    });
};
// 获取趋势图
export const tendency = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-trend-analysis',
        method: 'POST',
        data
    });
};
// 销售渠道分析
export const channelAnalysis = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-channel-analysis',
        method: 'POST',
        data
    });
};
//  人群分析
export const crowd = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-crowd-analysis',
        method: 'POST',
        data
    });
};
// 交易及客户转换scrm-api/console/retail/shop/statics-converse-list
export const converse = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-converse-list',
        method: 'POST',
        data
    });
};
// 转换
export const convert = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-converse',
        method: 'POST',
        data,
        timeout: 60000
    });
};
// 加购Top10
export const productTop = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-product-top',
        method: 'POST',
        data
    });
};
// 门店Top10
export const shopTop = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-sales',
        method: 'POST',
        data
    });
};

/**
 * 零售电商1.0-数据总览
 * @param data
 * @returns
 */
export const overViewV1 = (data: any) => {
    return request({
        url: '/scrm-api/retail/v1/stat/over-view',
        method: 'POST',
        data,
        noNeedLoading: true
    });
};

/**
 * 零售电商1.0-趋势图
 * @param data
 * @returns
 */
export const trendChartV1 = (data: any) => {
    return request({
        url: '/scrm-api/retail/v1/stat/trend-chart',
        method: 'POST',
        data,
        noNeedLoading: true
    });
};

/**
 * 零售电商1.0-支付金额占比
 * @param data
 * @returns
 */
export const payAmountProportionV1 = (data: any) => {
    return request({
        url: '/scrm-api/retail/v1/stat/pay-amount-proportion',
        method: 'POST',
        data,
        noNeedLoading: true
    });
};

/**
 * 零售电商1.0-商品支付金额TOP10
 * @param data
 * @returns
 */
export const goodsTopV1 = (data: any) => {
    return request({
        url: '/scrm-api/retail/v1/stat/goods-top',
        method: 'POST',
        data,
        noNeedLoading: true
    });
};

/**
 * 零售电商1.0-趋势图-导出
 * @param data
 * @returns
 */
export const trendChartExportV1 = (data: any) => {
    return request({
        url: '/scrm-api/retail/v1/stat/trend-chart-export',
        method: 'POST',
        data
    });
};

/**
 * 商品支付金额TOP10-导出
 * @param data
 * @returns
 */
export const goodsTopExportV1 = (data: any) => {
    return request({
        url: '/scrm-api/retail/v1/stat/goods-top-export',
        method: 'POST',
        data
    });
};
